package com.dd.stack.mybatisplus.pojo.enumeration;

import com.dd.stack.common.util.enumeration.CodedEnum;
import com.dd.stack.common.util.enumeration.DescribableEnum;
import lombok.AllArgsConstructor;

import java.util.ArrayList;
import java.util.List;

/**
 * @Author liuxianmeng
 * @CreateTime 2025/1/17 9:01
 * @Description 通用类型枚举
 */
@AllArgsConstructor
public enum DOTypeEnum implements CodedEnum<String>, DescribableEnum {
    ADMIN("管理员", 100, 0),
    NORMAL_USER("普通用户", 50, 0.95),
    VIP_USER("VIP用户", 80, 0.8);

    private final String desc;                // 枚举含义描述
    private final int privilegeLevel;         // 权限级别
    private final double discountRate;        // 折扣比例

    @Override
    public String getCode() {
        return name();
    }

    @Override
    public String getDescription() {
        return desc;
    }
}
